// 4. actionCreators.js
// 引入需要使用的 常量
import { ADD_NUMBER, SUB_NUMBER,INCREMENT,DECREMENT } from "./constants.js";

// 加
export const addAction = (num) => {
    return {
        type: ADD_NUMBER,
        num,
    };
};

// 减
export const subAction = (num) => ({
    type: SUB_NUMBER,
    num,
});

export const incAction = () => ({
    type: INCREMENT
})

export const decAction = () => ({
    type: DECREMENT
})
